﻿@model CNav.Model.ProductModel

@{
    ViewBag.Title = "Product - Details";
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <div id="productAccordion">
        <ol>
            <li>
                @Html.LabelFor(m => m.Name)
                @Html.DisplayFor(model => model.Name)
            </li>

            <li>
                @Html.LabelFor(m => m.Description)
                @Html.DisplayFor(model => model.Description)
            </li>
            <li>
                @Html.LabelFor(m => m.Category)
                @Html.DisplayFor(model => model.Category)
            </li>

            <li>
                @Html.LabelFor(m => m.SubCategory)
                @Html.DisplayFor(model => model.SubCategory)
            </li>
            <li>
                <label>&nbsp;</label>
                @Html.HiddenFor(m => m.ID)
                <input type="button" value="Edit" id="editButton" />
                <input type="button" value="Cancel" id="cancelButton" />
            </li>

        </ol>
    </div>
}

<script type="text/javascript">
    $(document).ready(function () {

        var cc = new CaseCentre();
        cc.BindCancel('#cancelButton', '@Url.Content("~/Product/")');
        cc.BindEdit('#editButton', '#ID', '@Url.Content("~/Product/Edit/")');
        
    });
</script>
